﻿using System;
using AjaxPro;

namespace NExt.Serialization.AjaxPro.Conversion
{
    public class ScriptJavaScriptConvertor : IJavaScriptConverter
    {
        public ScriptJavaScriptConvertor()
        {
            m_AllowInheritance = true;
            m_serializableTypes = new Type[] { typeof(global::NExt.Core.Model.Base.IScript) };
        }

        public override void Serialize(object o, System.Text.StringBuilder sb)
        {
            global::NExt.Core.Model.Base.IScript function = (global::NExt.Core.Model.Base.IScript)o;
            sb.Append(function.text);
        }
    }
}
